var HM=HM|| {};
function swiperAnimateCache(){
	$(".ani").each(function(index, element) {
         $(this).attr("swiper-animate-style-cache","").css({"visibility": "hidden"})
    });
}
function swiperAnimate(a,num){
	clearSwiperAnimate();
	num==undefined?num=0:num;
	$(a).eq(num).each(function(index, element) {
        var o=$(this);
		var b = o.find(".ani");
		b.each(function(index, element) {
              effect = $(this).attr("swiper-animate-effect");
			  duration = $(this).attr("swiper-animate-duration");
			  delay = $(this).attr("swiper-animate-delay");
              $(this).css({"visibility": "hidden","animation-duration":duration,"-webkit-animation-duration":duration,"animation-delay":delay,"-webkit-animation-delay":delay,"visibility":"visible"});
			  $(this).addClass(effect+ " animated")
        });
    });
}
function clearSwiperAnimate() {
	 $(".ani").each(function(index, element) {
        effect =$(this).attr("swiper-animate-effect");
		$(this).removeAttr("style").attr("swiper-animate-style-cache","").css({"visibility": "hidden"}).removeClass(effect).removeClass("animated")
    });	
}
HM= {
	 pl_scroll:function(){
        $(".pl-list").each(function(index, el) {
        	var T=$(this);
            var li=T.find("li");
            var timer=null;
            clearInterval(timer);
            timer=setInterval(function(){
            	var first=T.find("li:first");
                 first.fadeOut('700', function() {
                	 $(this).remove();
                	 T.find("ul").animate({top:-55},function(){
                	 	$(this).css({top:0})
                	 });
                	 first.show().appendTo(T.find("ul"))
                });
            },3000)
        });
	 },
   menu:function(){
     $(".hm-header .menu").click(function(event) {
         $(".hm-menu").addClass('slideInDown').fadeIn(400)
     });
      $(".hm-menu .close").click(function(event) {
         $(".hm-menu").removeClass('slideInDown').fadeOut(500)
     });
   }
}
$(function(){
   //评论滚动
   HM.pl_scroll();
   HM.menu()
  
})
